package xj.toolkit.netty.handler.codec.http.request;

import io.netty.handler.codec.http.DefaultFullHttpRequest;
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.HttpVersion;
import xj.toolkit.util.Identifier;
import xj.toolkit.util.UUIDIdentifier;

import java.util.UUID;

public class DefaultIdentifiableHttpRequest extends DefaultFullHttpRequest implements IdentifiableHttpRequest {

	private Identifier<UUID> identifier = new UUIDIdentifier();

	/**
	 * Creates a new instance.
	 *
	 * @param httpVersion
	 *            the HTTP version of the request
	 * @param method
	 *            the HTTP method of the request
	 * @param uri
	 *            the URI or path of the request
	 */
	public DefaultIdentifiableHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri) {
		super(httpVersion, method, uri);
	}

	@Override
	public Identifier<UUID> getIdentification() {
		return identifier;
	}

	public void setUuid(Identifier<UUID> uuid) {
		this.identifier = uuid;
	}
}
